3.26.24 \(\int x^{-1-2 n} (a+b x^n) \, dx\) [2524]

Optimal. Leaf size=25 \[ -\frac {a x^{-2 n}}{2 n}-\frac {b x^{-n}}{n} \]

[Out]

-1/2*a/n/(x^(2*n))-b/n/(x^n)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {14} \begin {gather*} -\frac {a x^{-2 n}}{2 n}-\frac {b x^{-n}}{n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-1 - 2*n)*(a + b*x^n),x]

[Out]

-1/2*a/(n*x^(2*n)) - b/(n*x^n)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin {align*} \int x^{-1-2 n} \left (a+b x^n\right ) \, dx &=\int \left (a x^{-1-2 n}+b x^{-1-n}\right ) \, dx\\ &=-\frac {a x^{-2 n}}{2 n}-\frac {b x^{-n}}{n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 22, normalized size = 0.88 \begin {gather*} \frac {x^{-2 n} \left (-a-2 b x^n\right )}{2 n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 - 2*n)*(a + b*x^n),x]

[Out]

(-a - 2*b*x^n)/(2*n*x^(2*n))

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 24, normalized size = 0.96

method result size
risch \(-\frac {b \,x^{-n}}{n}-\frac {a \,x^{-2 n}}{2 n}\) \(24\)
norman \(\left (-\frac {a}{2 n}-\frac {b \,{\mathrm e}^{n \ln \left (x \right )}}{n}\right ) {\mathrm e}^{-2 n \ln \left (x \right )}\) \(27\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1-2*n)*(a+b*x^n),x,method=_RETURNVERBOSE)

[Out]

-b/n/(x^n)-1/2*a/n/(x^n)^2

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 25, normalized size = 1.00 \begin {gather*} -\frac {a}{2 \, n x^{2 \, n}} - \frac {b}{n x^{n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-2*n)*(a+b*x^n),x, algorithm="maxima")

[Out]

-1/2*a/(n*x^(2*n)) - b/(n*x^n)

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 20, normalized size = 0.80 \begin {gather*} -\frac {2 \, b x^{n} + a}{2 \, n x^{2 \, n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-2*n)*(a+b*x^n),x, algorithm="fricas")

[Out]

-1/2*(2*b*x^n + a)/(n*x^(2*n))

________________________________________________________________________________________

Sympy [A]
time = 0.62, size = 24, normalized size = 0.96 \begin {gather*} \begin {cases} - \frac {a x^{- 2 n}}{2 n} - \frac {b x^{- n}}{n} & \text {for}\: n \neq 0 \\\left (a + b\right ) \log {\left (x \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1-2*n)*(a+b*x**n),x)

[Out]

Piecewise((-a/(2*n*x**(2*n)) - b/(n*x**n), Ne(n, 0)), ((a + b)*log(x), True))

________________________________________________________________________________________

Giac [A]
time = 1.18, size = 20, normalized size = 0.80 \begin {gather*} -\frac {2 \, b x^{n} + a}{2 \, n x^{2 \, n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-2*n)*(a+b*x^n),x, algorithm="giac")

[Out]

-1/2*(2*b*x^n + a)/(n*x^(2*n))

________________________________________________________________________________________

Mupad [B]
time = 1.21, size = 20, normalized size = 0.80 \begin {gather*} -\frac {a+2\,b\,x^n}{2\,n\,x^{2\,n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^n)/x^(2*n + 1),x)

[Out]

-(a + 2*b*x^n)/(2*n*x^(2*n))

________________________________________________________________________________________